<?php
    $javascript->link(array('jquery', 'comentarios/valida'), false);
?>
<div class="comentarios form">
    <?php echo $form->create('Comentario');?>
    <fieldset>
        <legend><?php __('Enviar Comentario');?></legend>
        <?php
                echo $form->hidden('Comentario.texto_id', array('value'=>$this->data['Comentario']['texto_id']));
                echo $form->hidden('Texto.slug', array('value'=>$this->data['Texto']['slug']));
                echo $form->hidden('Comentario.nome', array('value'=>$this->data['Comentario']['nome']));
                echo $form->hidden('Comentario.email', array('value'=>$this->data['Comentario']['email']));
                echo $form->hidden('Comentario.site', array('value'=>$this->data['Comentario']['site']));
                echo $form->hidden('Comentario.comentario', array('value'=>$this->data['Comentario']['comentario']));
	?>
        <div class="input text required">
            <img id="captcha" src="<?php echo $html->url('/comentarios/captcha_image');?>" alt="" align="left" style="padding-right: 15px;" />
             <!--<a href="javascript:void(0);" onclick="javascript:document.images.captcha.src='<?php echo $html->url('/comentarios/captcha_image');?>?' + Math.round(Math.random(0)*1000)+1">Reload image</a>-->
            <label for="ComentarioValidaCaptcha">Digite as letras e n&uacute;meros da imagem</label>
            <input name="data[Comentario][captcha]" type="text" style="width: 400px;" maxlength="10" value="" id="ComentarioValidaCaptcha" />
        </div>
    </fieldset>
    <?php echo $form->end('Salvar');?>
</div>
<div class="actions">
    <ul>
                <li><?php echo $html->link($html->image('list.png', array('alt' => __('Cancelar comentário', true))), array('action' => 'index'), null, false, false).' '.$html->link(__('Cancelar comentário', true), array('action' => 'index'));?></li>
    </ul>
</div>
